# -*- coding: utf-8 -*-
# @Time    : 2021/11/18 23:20
# @Author  : TangDagui
# @Email   : 3297364807@qq.com
# @File    : PythonOne.py
# @Software: PyCharm
mStr = input("请输入字符串：")
while mStr != "":
    mCounts = {}
    for i in mStr:
        mCounts[i] = mCounts.get(i, 0) + 1
        items = list(mCounts.items())
    items.sort(key=lambda x: x[1], reverse=True)
    for j in items:
        word, count = j
        print("{0:<10}{1:>5}".format(word, count))
    mStr = input("请输入字符串：")
